import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import overallAssembly from './components/index.js';
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

async function init(){
    const app = createApp(App)
    //配置路由
    app.use(router);
    //配置全局组件
    app.use(overallAssembly);
    //配置ui组件
    app.use(ElementPlus);
    for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
        app.component(key, component)
      }
    // 屏蔽错误信息
    // app.config.errorHandler = (err) => {
    //     console.log(err,'err')
    // };
    // // 屏蔽警告信息
    // app.config.warnHandler = (err) => {
    //     console.log(err,'watn')
    // };
    //挂载
    app.mount('#app');
}
init();